<?php

namespace Plugin\Alarm\Event;

class WorkTransferEvent extends AbstractWorkHandleEvent
{
    public array $work;
    public int $standId;
    public int $userId;
    public function __construct($work, $standId, $userId) {
        $this->work = $work;
        $this->standId = $standId;
        $this->userId = $userId;
    }

    public function getTitle(): string
    {
        return '工单创建';
    }

    public function getTargetUsers(): array
    {
        return [$this->userId];
    }

    public function getMessage(): string
    {
        return '#' . $this->work['id'] . ' ' . $this->work['title'] . '工单已转派。';
    }

}